SUPPORT / SAMPLES & SAS NOTES
 

Support

Problem Note 41709: "Hexadecimal value 0X is an invalid character" error running a SAS® Stored Process using SAS® Enterprise Guide or SAS® Add-in for Microsoft Office

DetailsAboutRate It

When running a SAS® Stored Process using SAS® Enterprise Guide® or SAS® Add-in for Microsoft Office, an error message will be displayed if the output contains an unprintable character.The error message will be similar to the following:

   An error occurred executing the stored process job "stp_name_here"
   'invalid character here', hexadecimal value 0x11, is an invalid character.
   Line 210, position 89.
  

This problem usually occurs when a SAS data set contains unprintable characters and a SAS Stored Process reads this data and attempts to create a report that contains the unprintable characters.

You can avoid this problem by identifying and removing the unprintable characters. As an example, the following code identifies unprintable characters that exist in a variable called value in a data set called baddata. The log file will include information about observations that contain unprintable characters. The new data set will contain only observations where the value variable does not contain unprintable characters.

 data good;  
   set baddata;
     /* Check value variable for unprintable characters */
   notpr = notprint(value);   
     /* Output record if it does not contain any unprintable characters */
   if notpr = 0 then  /* Value was okay */
     output; 
   else do;  /* Output message to the log file */
     badchar=substr(value,notpr);
     put "*UNPRINTABLE Character exists in this record*";
     put "Hex Value: " badchar= $hex2.;
     put _all_; 
   end; 
 run;
 
 proc print data=good;
 run;

  /* If you know the value of the unprintable character, you  */
  /* can remove it with the COMPRESS function or translate it */
  /* to another character with the TRANSLATE function.        */

 data good2;
   set baddata;
   value = compress(value,'11'x);  /* Remove Hex '11'x character */
   /* value = translate(value,' ','11'x);  */
 run;

 


Operating System and Release Information

Product FamilyProductSystemProduct ReleaseSAS Release
ReportedFixed*ReportedFixed*
SAS SystemSAS Enterprise GuideMicrosoft® Windows® for x644.34.39.2 TS2M39.3 TS1M0
Microsoft Windows Server 2003 Datacenter Edition4.34.39.2 TS2M39.3 TS1M0
Microsoft Windows Server 2003 Enterprise Edition4.34.39.2 TS2M39.3 TS1M0
Microsoft Windows Server 2003 Standard Edition4.34.39.2 TS2M39.3 TS1M0
Microsoft Windows Server 2003 for x644.34.39.2 TS2M39.3 TS1M0
Microsoft Windows Server 20084.34.39.2 TS2M39.3 TS1M0
Microsoft Windows Server 2008 for x644.34.39.2 TS2M39.3 TS1M0
Microsoft Windows XP Professional4.34.39.2 TS2M39.3 TS1M0
Windows 7 Enterprise 32 bit4.34.39.2 TS2M39.3 TS1M0
Windows 7 Enterprise x644.34.39.2 TS2M39.3 TS1M0
Windows 7 Home Premium 32 bit4.34.39.2 TS2M39.3 TS1M0
Windows 7 Home Premium x644.34.39.2 TS2M39.3 TS1M0
Windows 7 Professional 32 bit4.34.39.2 TS2M39.3 TS1M0
Windows 7 Professional x644.34.39.2 TS2M39.3 TS1M0
Windows 7 Ultimate 32 bit4.34.39.2 TS2M39.3 TS1M0
Windows 7 Ultimate x644.34.39.2 TS2M39.3 TS1M0
Windows Vista4.34.39.2 TS2M39.3 TS1M0
Windows Vista for x644.34.39.2 TS2M39.3 TS1M0
* For software releases that are not yet generally available, the Fixed Release is the software release in which the problem is planned to be fixed.